package com.cuitrip.business.comment.ui;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.cuitrip.business.comment.model.Number;
import com.cuitrip.service.R;
import com.lab.adapter.BaseHolderView;
import com.lab.adapter.IAdapterData;

import butterknife.Bind;
import butterknife.ButterKnife;


/**
 * 数字的holderview
 * Created by ak
 */
public class NumberHolderView extends BaseHolderView {


    @Bind(R.id.number)
    TextView numberTextView;

    public NumberHolderView(Context context) {
        super(context, R.layout.number_item);
    }


    @Override
    public void initView(View rootView) {
        this.setClickable(true);
        ButterKnife.bind(this);
    }


    @Override
    public void bindData(final IAdapterData data, final int position) {
        if (data instanceof Number) {
            Number number = (Number) data;
            numberTextView.setText(String.valueOf(number.getValue()));
        }
    }


}
